#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Farmer Li, 公众号: 很酷的程序员/RealCoolEngineer
# @Date: 2021-09-14
# @Question: https://www.zhihu.com/question/485163145/answer/2121135029

import numpy as np


def process(data):
    if len(data) % 2 != 0:
        # Exception
        return 0
    d = np.asarray(data)
    # Index 0,2,4... +  1,3,5...
    d = d[::2] + d[1::2]
    return np.max(d)


def main():
    ret = process([1, 3, 0, 2])
    print(f'Result: {ret}')


if __name__ == '__main__':
    main()
